Exporting OLE objets

Hi,

I tried to export to Word some requirements including OLE objects.
With RichClip and RichText, the OLE objects are well exported as embedded objects. I mean, I get a picture of the OLE object in the final Word document and I have to select it in order to have the all content of the object in a new Word document attached.
For example, when the OLE object is a multi page table in a Word document, in the extracted Word document, only the first lines appear.

What I want is that the OLE objects exported to Word are not embedded in it. No need to select the picture of the object in order to view it entirely.

Best regards
Estebell - Thu Apr 19 03:37:39 EDT 2012

Re: Exporting OLE objets
PDU - Thu Apr 19 04:51:26 EDT 2012

Hi,

the problem is fro all OLE objects.
the solution is to use VBA.

We have done the work for Word OLE objects, the code can be an example for other types of OLE

Sub ExpandOleWord()
'
' Macro enregistrée le 28/04/2010 
'
    
    Dim colIS As InlineShapes
    Dim itemIS As InlineShape
    Dim StrWd As String
 
 
    StrWd = ActiveDocument.Name
    Set colIS = ActiveDocument.InlineShapes
    If colIS.Count >= 1 Then
        For Each itemIS In colIS
            Select Case itemIS.Type
                Case wdInlineShapeEmbeddedOLEObject
                    If InStr(1, itemIS.OLEFormat.ClassType, "Word")  0 Then
                        itemIS.OLEFormat.Open
                        itemIS.OLEFormat.Activate
                        Selection.WholeStory
                        Selection.Copy
                        Documents(StrWd).Activate
                        Selection.PasteAndFormat (wdFormatOriginalFormatting)
                    End If
                Case wdInlineShapeHorizontalLine
                    'itemIS.OLEFormat.Edit
                Case wdInlineShapeLinkedOLEObject
                    'itemIS.OLEFormat.Edit
                Case wdInlineShapeLinkedPicture
                    'itemIS.OLEFormat.Edit
                Case wdInlineShapeLinkedPictureHorizontalLine
                    'itemIS.OLEFormat.Edit
                Case wdInlineShapeOLEControlObject
                    'itemIS.OLEFormat.Edit
                Case wdInlineShapeOWSAnchor
                    'itemIS.OLEFormat.Edit
                Case wdInlineShapePicture
                    'itemIS.Activate
                Case wdInlineShapePictureBullet
                    'itemIS.OLEFormat.Edit
                Case wdInlineShapePictureHorizontalLine
                    'itemIS.OLEFormat.Edit
                Case wdInlineShapeScriptAnchor
                    'itemIS.OLEFormat.Edit
            End Select
        Next
    End If
 
End Sub

 


Regards
Pierre

 

Re: Exporting OLE objets
Estebell - Thu Apr 19 11:00:56 EDT 2012

Hi,

Thanks very much for your help. I modified the VBA code to enhance it a little bit and that works fine.

As I don't want to run my dxl export and then the VBA on word, is it possible to launch the VBA code from the dxl ?
And one other question : when a DOORS object contains an OLE object (for exemple a Word document), how can I do to have a new Word document opening, instead of a Word document embedded in the DOORS view ?

Best regards